<extend name="Index/index" />

<block name="link">
    <title>Store</title>
    <meta charset="utf-8">
    <!-- <link href="__PUBLIC__/store_public/css/global.css" rel="stylesheet" type="text/css" /> -->
    <link href="__PUBLIC__/store_public/css/global_schinese.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/publicheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/storeheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store_featured.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/buttons.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/valvefooter.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store1.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/cart.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">

    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/store_public/js/jquery-1.7.1.min.js"></script>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <link href="__PUBLIC__/store_public/css/global_schinese.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/publicheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/storeheader.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/store_featured.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/buttons.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/store_public/css/itemdetails.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/store_public/css/buttons.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/store_public/css/valvefooter.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/store_public/unitegallery/css/normalize.css" />
    <link rel='stylesheet' href='__PUBLIC__/store_public/unitegallery/css/unite-gallery.css' type='text/css' />
    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script type='text/javascript' src='__PUBLIC__/store_public/unitegallery/js/jquery-11.0.min.js'></script>   
    <script type='text/javascript' src='__PUBLIC__/store_public/unitegallery/js/unitegallery.min.js'></script>  
    <script type='text/javascript' src='__PUBLIC__/store_public/unitegallery/themes/default/ug-theme-default.js'></script>
    <link rel='stylesheet' href='__PUBLIC__/store_public/unitegallery/themes/default/ug-theme-default.css' type='text/css' />
    <link rel="stylesheet" href="__PUBLIC__/store_public/css/bars-pill.css">
</block>

<block name="main">
    </head>
    <body class="MainBackgroundImage">
                <script src='__PUBLIC__/store_public/kind/kindeditor-min.js'></script>
                <script src='__PUBLIC__/store_public/kind/zh_CN.js'></script>
                <script>
                    // 富文本编辑器
                    var editor;
                    KindEditor.ready(function(K) {
                        //  描述多文本域的 name名
                        editor = K.create('textarea[name="content"]', {
                            resizeType : 1,
                            allowPreviewEmoticons : false,
                            allowImageUpload : false,
                            items : [
                                'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                                'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
                                'insertunorderedlist', '|', 'emoticons', 'image', 'link']
                        });
                        // 编辑富文本内容
                        // editor.html('<?=  $goods['describe'] ?>');
                    })
                </script>
        <div class="StorePageBody" class="Hidden">
            <!-- StoreContainer start -->
            <div class="StoreContainer">
                <div class="StoreContainerBg"></div>
                <div id="StoreTabs">
                    <span id="StoreTabButtons">
                        <a href="<{:U('Home/Store/index')}>" class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton ">主打</a>
                        <a href="<{:U('Home/Store/list?list=1')}>" <if condition="$mark eq 1">class="StoreTab NoSelect  StoreTabActive GrayButton"<else />class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton" 
                        </if>>英雄套装</a>
                        <a href="<{:U('Home/Store/list?list=2')}>"  <if condition="$mark eq 2">class="StoreTab NoSelect  StoreTabActive GrayButton"<else />class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton"
                        </if>>
                        物品</a>
                        <a href="<{:U('Home/Store/list?list=3')}>"  <if condition="$mark eq 3">class="StoreTab NoSelect  StoreTabActive GrayButton"<else />class="StoreTab DarkGrayButton NoSelect StoreTabMenuButton" 
                        </if>>职业商店</a>
                        <span class="LowerBg"></span>
                    </span>
                    <span class="StoreTabPadding"></span>
                    <div id="StoreSearchForm">
                        <form action="<{:U('Home/Store/list?list=search')}>" method="post" name="form1" id="form1">
                        <input type="text" id="StoreSearchInput" autocomplete="off" spellcheck="false" placeholder="搜索" name="search"/>
                    </form>
                    <div id="storeSearchButton" class="glyphicon glyphicon-search" style="position: absolute;top: 5px;right: 5px;width: 19px;height: 19px;background-image: url(http://cdn.dota2.com.cn/apps/dota2/images/store/icon_search.png?1);background-size: 19px 19px;background-repeat: no-repeat;pointer-events: none;font-family: Arial;"></div>
                    </div>

                    <div id="CartButton" class="NoSelect CartHeaderButton NoItems">
                        <span id="CartButtonText" class="">
                            <div id="CartButtonTextIcon"></div>
                            <a href="<{:U('Home/Cart/index')}>">购物车</a>
                        </span>
                        </span>
                    </div>
                </div>

                <!-- ContentContainer  start -->
                <div id="ContentContainer">
                    <!-- Featured start -->
                    <div id="Featured" class="Hidden" style="display: block;">
                        <div class="PreviewContainer">
                            <h2>评价</h2>
                            <div style="margin-top:20px;margin-left:20px;">
                                <h4 style="">商品名: <span><{$data['g_name']}></span></h4>
                                <p>请给我们的商品定个星级吧!</p>
                                    <select id="example-pill" name="rating">
                                        <option value="1">★</option>
                                        <option value="2">★</option>
                                        <option value="3">★</option>
                                        <option value="4">★</option>
                                        <option value="5">★</option>
                                    </select>
                                    <div style="margin-top:20px;"></div>
                                    <form action="<{:U('Home/Appraise/add')}>" method="post">
                                        <input type="hidden" name="gid" value="<{$data['g_id']}>">
                                        <input type="hidden" name="gstar" value="" id="myStar">
                                        <textarea name="content" id="desc"></textarea>
                                        <div style="margin-top:30px;"></div>
                                        <button class="btn btn-success">提交</button>
                                    </form>
                            </div>
                        </div>
                    <!-- Featured end -->
                </div><!-- ContentContainer  end -->

            </div><!-- StoreContainer end -->
            <div class="ValveFooter"></div>
        </div>
        <!-- StorePageBody end -->

        <!-- Modal -->
        <div class="modal fade " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="position: fixed; z-index: 9999; top: 180px; left: 15px;">
            <div class="modal-dialog">
                <center>
                    <div class="modal-content" style="background-image: url(http://cdn.dota2.com.cn/apps/dota2/images/store/bg_modal.jpg);width: 458px;height: 216px;">
                        <div id="CartConfirmModalSuccess" style="display: block;">
                            <h2 style="margin: 0;padding: 36px 0 12px 0;font-size: 20px;font-weight: normal;color: #c6c6c6;">物品已加入购物车。</h2>
                            <p style="padding: 10px 0 13px 0;;"></p>
                            <div class="GreenButton BigButton ModalConfirmButton" onclick="CloseCartConfirmDlg();" data-dismiss="modal">继续购物</div>
                        </div>
                    </div>
                </center>
            </div>
        </div>
    
    <script>window.jQuery || document.write('<script src="__PUBLIC__/store_public/js/jquery-1.11.0.min.js"><\/script>')</script>
    <script src="__PUBLIC__/store_public/js/jquery.barrating.js"></script>
    <script>
        $('#StoreSearchInput').blur(function(){
            document.form1.submit();
        });
        
        $(function() {
        function ratingEnable() {
            $('#example-pill').barrating('show', {
                theme: 'bars-pill',
                initialRating: 'A',
                showValues: true,
                showSelectedRating: false,
                onSelect:function(value, text) {
                    $('#myStar').val(value);
                }
            });
        }

        function ratingDisable() {
            $('select').barrating('destroy');
        }

        $('.rating-enable').click(function(event) {
            event.preventDefault();

            ratingEnable();

            $(this).addClass('deactivated');
            $('.rating-disable').removeClass('deactivated');
        });

        $('.rating-disable').click(function(event) {
            event.preventDefault();

            ratingDisable();

            $(this).addClass('deactivated');
            $('.rating-enable').removeClass('deactivated');
        });

        ratingEnable();
        });
    </script>
</block>
</body>

</html>